import StartIcon from "../../../assets/nodeIcon/start.png";
import ConditionIcon from "../../../assets/nodeIcon/condition.png";
import SwitchIcon from "../../../assets/nodeIcon/switch.png";
import DanXingFenZhi from "../../../assets/nodeIcon/icon-danxingfenzhi.png";
import WaitIcon from "../../../assets/nodeIcon/wait.png";
import ABTestIcon from "../../../assets/nodeIcon/abtest.png";
import EndIcon from "../../../assets/nodeIcon/end.png";
import MessageIcon from "../../../assets/nodeIcon/message.png";
import EmailIcon from "../../../assets/nodeIcon/email.png";
import WorkwxIcon from "../../../assets/nodeIcon/workwx.png";
import PublicNumberIcon from "../../../assets/nodeIcon/publicNumber.png";
import AppMessageIcon from "../../../assets/nodeIcon/appMessage.png";
import AppMessageBoxIcon from "../../../assets/nodeIcon/appMessageBox.png";
import AppNoticeIcon from "../../../assets/nodeIcon/appNotification.png";
import MiniProgramNotificationIcon from "../../../assets/nodeIcon/miniProgramNotification.png";
import QiyeWeixinMessageIcon from "../../../assets/nodeIcon/qiyeWeixinMessage.png";
import QiyeWeixinAddFriendIcon from "../../../assets/nodeIcon/qiyeWeixinAddFriend.png";
import TianJiaBiaoQian from "../../../assets/nodeIcon/icon-tianjiabiaoqian.png";
import YiChuBiaoQian from "../../../assets/nodeIcon/icon-yichubiaoqian.png";
import TianJiaKeQun from "../../../assets/nodeIcon/icon-tianjiakequn.png";
import YiChuKeQun from "../../../assets/nodeIcon/icon-yichukequn.png";

export const NodeRectInfo = {
  width: 80, // px
  height: 95, // px
}


// 通用节点列表
export const NodesList = [
  {
    key: 'start',
    iconSrc: StartIcon,
    label: '开始',
  },
  {
    key: 'condition',
    iconSrc: ConditionIcon,
    label: '条件判断',
  },
  {
    key: 'switcherConcurrent',
    iconSrc: SwitchIcon,
    label: '并行分支',
  },
  {
    key: 'switcherCondition',
    iconSrc: DanXingFenZhi,
    label: '单行分支',
  },
  {
    key: 'wait',
    iconSrc: WaitIcon,
    label: '等待',
  },
  {
    key: 'abtest',
    iconSrc: ABTestIcon,
    label: 'AB测试',
  },
  {
    key: 'end',
    iconSrc: EndIcon,
    label: '结束',
  }
  // {
  //   key: 'placeholder',
  //   iconSrc: EndIcon,
  //   label: '占位节点',
  // }
]

export const NodesMap = {}
NodesList.forEach(item => {
  NodesMap[item.key] = item
})

// 动作节点列表
export const ActionNodeList = [
  {
    key: 'messageAction',
    iconSrc: MessageIcon,
    label: '发送短信',
  },
  {
    key: 'emailAction',
    iconSrc: EmailIcon,
    label: '发送邮件',
  },
  {
    key: 'workWechatAction',
    iconSrc: WorkwxIcon,
    label: '企微群发',
  },
  {
    key: 'publicNumberAction',
    iconSrc: PublicNumberIcon,
    label: '发送模板消息',
  },
  {
    key: 'addTagAction',
    iconSrc: TianJiaBiaoQian,
    label: '添加标签',
  },
  {
    key: 'delTagAction',
    iconSrc: YiChuBiaoQian,
    label: '移除标签',
  },
  {
    key: 'addCustomerGroupAction',
    iconSrc: TianJiaKeQun,
    label: '添加至客群',
  },
  {
    key: 'delCustomerGroupAction',
    iconSrc: YiChuKeQun,
    label: '移出客群',
  },
  {
    key: 'appMessageAction',
    iconSrc: AppMessageIcon,
    label: 'APP消息',
    disabled: true,
  },
  {
    key: 'appMessageBoxAction',
    iconSrc: AppMessageBoxIcon,
    label: 'APP弹窗',
    disabled: true,
  },
  {
    key: 'appNoticeAction',
    iconSrc: AppNoticeIcon,
    label: 'APP通知',
    disabled: true,
  },
  {
    key: 'miniProgramAction',
    iconSrc: MiniProgramNotificationIcon,
    label: '小程序通知',
    disabled: true,
  },
  {
    key: 'weChatFriendMessageAction',
    iconSrc: QiyeWeixinMessageIcon,
    label: '企微好友消息',
    disabled: true,
  },
  {
    key: 'weChatAddFriendAction',
    iconSrc: QiyeWeixinAddFriendIcon,
    label: '企微加好友',
    disabled: true,
  }
]
